/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 *
 */

/**
 * 为resolver提供缓存机制
 */
export class ResolverCache {
  private static cacheMap = new Map<string, string>();

  static has(key: string) {
    return ResolverCache.cacheMap.has(key);
  }

  static get(key: string) {
    return ResolverCache.cacheMap.get(key);
  }

  static set(key: string, val: string) {
    return ResolverCache.cacheMap.set(key, val);
  }

  static clear() {
    return ResolverCache.cacheMap.clear();
  }
}
